@charset "UTF-8";

@import url(../../../../css/mobile/normalize.css);
@import url(../../../../css/mobile/components/alert.css);
@import url(../../../../css/mobile/components/login.css);

@font-face {
  font-weight: normal;
  font-style: normal;
  font-family: 'VarelaRound-Regular';
  src: url(../../../../fonts/mobile/VarelaRound-Regular.eot);
  src: url(../../../../fonts/mobile/VarelaRound-Regular.eot) format('embedded-opentype'),
       url(../../../../fonts/mobile/VarelaRound-Regular.woff) format('woff'),
       url(../../../../fonts/mobile/VarelaRound-Regular.ttf) format('truetype'),
       url(../../../../fonts/mobile/VarelaRound-Regular.svg) format('svg');
}

html, body {
  font-family: "VarelaRound-Regular", "PingFang SC", "Microsoft YaHei";
}

body {
  font-size: 16px;
}

header {
  height: 4.2rem;
  width: 100%;
  background: #32cdff;
  position: relative;
  overflow: hidden;

  .progress-circle {
    position: absolute;
    height: 2.26rem;
    width: 2.26rem;
    top: 0.42rem;
    left: 50%;
    margin-left: -1.13rem;
    cursor: pointer;

    .circle {
      -webkit-transform: rotate(90deg);
              transform: rotate(90deg);

      .back {
        fill: none;
        stroke: rgba(255, 255, 255, 0.1);
      }
      .prog {
        fill: none;
        stroke: #ffffff;
        stroke-dasharray: 0, 99999;
        stroke-dashoffset: 0;
        stroke-linecap: round;
        -webkit-transition: stroke-dasharray 0.7s linear 0s;
                transition: stroke-dasharray 0.7s linear 0s;
      }
    }
    .end {
      visibility: hidden;
      position: absolute;
      top: 0;
      left: 0;

      .in {
        fill: #ffffff;
      }
      .out {
        fill: rgba(255, 255, 255, 0.2);
      }
    }
    .text {
      position: absolute;
      width: 100%;
      top: 0.48rem;
      text-align: center;
      color: #ffffff;

      .title {
        font-size: 0.16rem;
      }

      .percentage {
        &:before {
          content: attr(data-current);
          font-size: 0.6rem;
        }
        &:after {
          content: "节";
          font-size: 0.18rem;
        }
      }

      .date,
      .target {
        font-size: 0.14rem;
      }
      .date {
        &:before {
          content: '截止到';
        }
        margin-top: 0.06rem;
      }
      .target {
        &:before {
          content: '目标：';
        }
        margin-top: 0.02rem;

        &:after {
          content: '节';
        }
      }
    }
  }
  .progress {
    position: absolute;
    top: 3.1rem;
    width: 100%;
    color: #ffffff;
    text-align: center;

    .done,
    .remain,
    .advise {
      display: inline-block;
      width: 0.8rem;
      height: 0.5rem;
      vertical-align: top;
      
      .num {
        font-size: 0.24rem;
        color: #ffffff;

        .big {
          font-size: 0.24rem;
        }
        .small {
          font-size: 0.16rem;
          &:before {
            content: '/';
          }
        }
      }
      .text {
        margin-top: 0.02rem;
        font-size: 0.14rem;
        color: rgba(255, 255, 255, 0.7);
      }
    }
    .line {
      display: inline-block;
      margin: 0.1rem 0.18rem;
      width: 0.01rem;
      height: 0.3rem;
      vertical-align: top;
      background-color: rgba(255, 255, 255, 0.5);
    }
  }

  $r: (375*375/16000)+0.1rem;
  &:after {
    position: absolute;
    left: (3.75/2)-$r;
    bottom: 0.23-$r*2;
    content: "";
    background: #ffffff;
    width: $r*2;
    height: $r*2;
    border-radius: 50%;
  }
  .circle-1, .circle-2 {
    position: absolute;
    left: (3.75/2)-$r;
    bottom: 0.25-$r*2;
    width: $r*2;
    height: $r*2;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.4);
    -webkit-animation: 5s linear 0s normal none infinite rotate;
            animation: 5s linear 0s normal none infinite rotate;
  }
  .circle-1 {
    -webkit-transform-origin: $r+(-0.02) $r+(-0.01);
            transform-origin: $r+(-0.02) $r+(-0.01);
  }
  .circle-2 {
    -webkit-transform-origin: $r+0.01 $r+0.02;
            transform-origin: $r+0.01 $r+0.02;
  }
  @-webkit-keyframes rotate {
    from {
      -webkit-transform: rotate(0deg);
      transform: rotate(0deg);
    }
    to {
      -webkit-transform: rotate(360deg);
      transform: rotate(360deg);
    }
  }
  @keyframes rotate {
    from {
      -webkit-transform: rotate(0deg);
      transform: rotate(0deg);
    }
    to {
      -webkit-transform: rotate(360deg);
      transform: rotate(360deg);
    }
  }
}

main {
  width: 100%;

  .title {
    color: #282B31;
    font-size: 0.16rem;
    text-align: center;
    margin: 0.2rem auto 0.24rem auto;
    &:before, &:after {
      display: inline-block;
      content: '';
      width: 0.03rem;
      height: 0.05rem;
      margin: 0 0.08rem;
      vertical-align: middle;
      border-left: 0.02rem solid #32CDFF;
      border-right: 0.02rem solid #32CDFF;
      -webkit-transform: skewX(-26.56505117707799deg);
              transform: skewX(-26.56505117707799deg);
    }
  }

  .award {
    text-align: center;
    margin-bottom: 0.4rem;
    .item {
      display: inline-block;
      text-align: center;
      vertical-align: top;
      width: 0.84rem;
      height: 0.68rem;
      font-size: 0.14rem;
      color: #4B4F57;

      img {
        width: 0.4rem;
        height: 0.4rem;
      }
    }
  }

  .record {
    text-align: left;
    margin-left: 0.16rem;

    // iPhone 5
    @media only screen and (min-device-width : 320px) and (max-device-width : 374px) and (orientation : portrait) {
      margin-left: 0.115rem;
    }
    // iPhone 6
    @media only screen and (min-device-width: 375px) and (max-device-width: 413px) and (orientation : portrait) {
      margin-left: 0.15rem;
    }
    // iPhone 6 plus
    @media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation : portrait) {
      margin-left: 0.12rem;
    }

    span {
      display: inline-block;
      width: 35px;
      height: 35px;
      text-align: center;
      background: #32CDFF;
      border-radius: 50%;
      color: #FFFFFF;
      line-height: 35px;
      vertical-align: top;
      margin: 7px 4px;
      font-size: 14px;

      &.ok {
        width: 35px;
        height: 35px;
        background-image: url('../../../../mobile/campaign/achievement/icon/ic_ok3.png');
        background-size: 100% 100%;
      }
      &.warn {
        background: #FF9A3A;
      }
      &.empty {
        color: #676C75;
        background-color: #FFFFFF;
      }
    }
  }

  .use-case {
    width: 2.97rem;
    height: 0.36rem;
    margin: 0.24rem auto 0 auto;
    border-top: 1px solid #E7E8EA;
    border-bottom: 1px solid #E7E8EA;
    text-align: center;
    font-size: 0.14rem;
    color: #4B4F57;

    span {
      display: inline-block;
      height: 0.36rem;
      line-height: 0.36rem;


      &:before {
        display: inline-block;
        content: '';
        width: 0.08rem;
        height: 0.08rem;
        border-radius: 50%;
        margin-right: 0.08rem;
      }

      &.completed:before {
        border: 1px solid #32CDFF;
        background-color: #32CDFF;
      }

      &.forget {
        margin: 0 0.36rem;

        &:before {
          border: 1px solid #FF9A3A;
          background-color: #FF9A3A;
        }
      }

      &.undone:before {
        border: 1px solid #999EA8;
      }
    }
  }

  .buttons {
    text-align: center;
    padding: 0.4rem 0 0.2rem 0;

    button {
      font-size: 0.16rem;
      width: 2.25rem;
      height: 0.44rem;
      border-radius: 1rem;
      border: 0;
      outline: none;
      margin: 0.025rem auto;

      &.blue {
        color: #FFFFFF;
        background: #32CDFF;
      }
      &.white {
        color: #32CDFF;
        background: #FFFFFF;
      }
    }
  }
}

.msgbox-mask {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1003;
  overflow: hidden;

  .msgbox {
    width:90%;
    margin:50%  auto 0 auto;
    background-color: white;
    border-radius: 4px;
    position: relative;
    padding: 27px 0 20px 0 ;
    text-align: center;
    z-index: 1004;

    .tick-on {
      position: absolute;
      top: -28px;
      margin-left: -20px;
      display: inline-block;
      width: 40px;
      height: 47px;
      border-radius: 50%;
      background-image: url('../../../../mobile/campaign/achievement/icon/ic_tick_on.png');
      background-repeat: no-repeat;
    }

    .title {
      font-size: 24px;
      color: #32CDFF;
      text-align: center;
    }

    .content {
      margin-top: 16px;
      font-size: 16px;
      color: #4B4F57;
    }

    .buttons {
      margin-top: 40px;

      button {
        width: 43%;
        height: 38px;
        font-size: 14px;
        border: 0;
        outline: none;
        border-radius: 100px;

        &.white {
          color: #282B31;
          background: #F2F3F4;
        }

        &.blue {
          color: #FFFFFF;
          background: #32CDFF;
        }
      }
    }

    .award {
      width: 208px;
      height: 208px;
      margin: 40px auto 0 auto;
      position: relative;
      > {
        .item {
          width: 50%;
          position: absolute;

          .text {
            margin-top: 8px;
          }

          img {
            width: 0.5rem;
            height: 0.5rem;
          }

          &.ok {
            &:after {
              position: absolute;
              top: -10px;
              right: 23px;
              display: inline-block;
              width: 20px;
              height: 20px;
              content: '';
              background-image: url('../../../../mobile/campaign/achievement/icon/ic_ok.png');
              background-size: 20px 20px;
              background-repeat: no-repeat;
              border: 2px solid white;
              border-radius: 50%;
            }
          }
        }
        .top-left {
          top: 0;
          left: 0;
        }
        .top-right {
          top: 0;
          right: 0;
        }
        .bottom-left {
          bottom: 0;
          left: 0;
        }
        .bottom-right {
          bottom: 0;
          right: 0;
        }
      }
    }
  }
}